<%@ page contentType="text/html;charset=UTF-8" isELIgnored="false" autoFlush="true"%>
<%@ taglib uri="/WEB-INF/displaytag.tld" prefix="display"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<table align="center" width="100%" cellpadding="0" cellspacing="0" border="0">
    <tr>
        <td>   
            <span class="title1">发件箱</span>
        </td>
        <td align="center">
            &nbsp;
        </td>
        <td width="450">您已经发送<b><c:out value="${fn:length(sentmessages)}"/></b>条短消息,系统自动删除<%=com.mr.qa.GlobalConfigs.MAX_MESSAGES%>条后的旧消息</td>
    </tr>
</table>
<display:table name="sentmessages" class="qlist" id="message" cellpadding="0" cellspacing="0">
    <display:column title="To">
        <c:if test="${empty message.mrIaskUserByToUserId}">
            <c:out value="${message.toUserLoginName}"/>
        </c:if>
        <c:if test="${not empty message.mrIaskUserByToUserId}">
        <c:url value="/user.mrqa?action=viewuserbyother" var="userLink">
            <c:param name="id" value="${message.mrIaskUserByToUserId.id}"/>
        </c:url>
        <a href="<c:out value="${userLink}"/>"><c:out value="${message.mrIaskUserByToUserId.loginName}"/></a>
        </c:if>
    </display:column>
    <display:column title="主题">
        <html:link page="/msg.mrqa?action=view" paramId="id" paramName="message" paramProperty="id">
        <c:out value="${message.title}"/>
        </html:link>
    </display:column>
    <display:column title="发送日期">
        <fmt:formatDate value="${message.postDate}" type="both" pattern="yyyy-MM-dd HH:mm"/>
    </display:column>
    <display:column title="操作">
        <html:link page="/msg.mrqa?action=delete&from=got" paramId="id" paramName="message" paramProperty="id">
            删除
        </html:link>
    </display:column>
</display:table>